﻿#ifndef ROLESERVICE_H
#define ROLESERVICE_H

#include <QObject>
#include "roledao.h"

class RoleService: public QObject
{
    Q_OBJECT
public:
    RoleService(QObject *parent = nullptr);
    ~RoleService();
    bool getPermissionsByCodes(QList<QString> &permissions,const QList<QString> codes);
    bool getPageList(uint64_t &total,QList<Role> &users,const  uint64_t &page,const  uint64_t &pageSize);
    bool getList(QList<Role> &list);
    bool getOne(Role &object);
    bool saveOne(Role &object,QBaseEntity::PropertiesType propertiesType=QBaseEntity::AllProperty,QStringList properties={});
    bool deleteOne(Role &object);
private:
    QSqlDatabase db;
};

#endif // ROLESERVICE_H
